package client;

import java.awt.Color;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

/**
 * Links the 5 Magic Colors to a more accurate color of what it looks like
 * 
 * @author Robz
 * 
 */
public enum MagicColor {
	WHITE(new Color(0xf3e4ad)), BLACK(Color.BLACK), RED(Color.RED), GREEN(
			new Color(0x476f3a)), BLUE(new Color(0x6c7096));

	private static final Map<Color, MagicColor> lookup = new HashMap<Color, MagicColor>();

	static {
		for (MagicColor s : EnumSet.allOf(MagicColor.class))
			lookup.put(s.getColor(), s);
	}

	private Color realColor;

	private MagicColor(Color realColor) {
		this.realColor = realColor;
	}

	public Color getColor() {
		return realColor;
	}

	public static MagicColor get(int realColor) {
		return lookup.get(realColor);
	}
}
